package day07.hotel;

public class Hotel {

	Room[][] rooms;

	// 当酒店被创建, 酒店的120个房间应当随之创建并初始化
	public Hotel() {
		this.rooms = new Room[10][12];
		for (int i = 0; i < rooms.length; i++) {
			for (int j = 0; j < rooms[i].length; j++) {
				String row = (i + 1 <= 9 ? "0" : "") + (i + 1);
				String column = (j + 1 <= 9 ? "0" : "") + (j + 1);
				String num = row + column;
				Room r = new Room(num);
				this.rooms[i][j] = r;
			}
		}
	}

}
